package com.itcat.service.impl;/*
 * @Author: gonhsl
 * @Date:2022-04-02-17:06
 * */

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itcat.api.mysql.SmsCouponApi;
import com.itcat.mysql.param.SmsCouponParam;
import com.itcat.mysql.pojo.SmsCoupon;
import com.itcat.service.SmsCouponService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class SmsCouponServiceImpl implements SmsCouponService {
    @DubboReference
    private SmsCouponApi smsCouponApi;
    @Override
    public Page<SmsCoupon> findList(Integer pageNum, Integer pageSize, String name, Integer type) {
        Page<SmsCoupon> page = smsCouponApi.findList(pageNum, pageSize, name, type);
        return page;
    }

    @Override
    public void create(SmsCouponParam couponParam) {
        smsCouponApi.create(couponParam);
    }

    @Override
    public void delete(Integer id) {
        smsCouponApi.delete(id);
    }

    @Override
    public void update(SmsCouponParam couponParam, Integer id) {
        smsCouponApi.update(couponParam, id);
    }

    @Override
    public SmsCouponParam findOne(Integer id) {
      return  smsCouponApi.findOne(id);
    }
}
